package com.pine.manager.pineframework.trigger;

import com.pine.common.beans.pineframework.request.DynamicThreadPoolRefreshRequest;
import com.pine.common.trigger.TriggerContext;
import com.pine.common.trigger.TriggerUtil;
import com.pine.manager.core.TriggerTypeEnum;

/**
 * <p>
 * 系统动态线程池 触发器管理类
 * </p>
 *
 * @author pine manage
 * @since 2024-08-29
 */
public class SysDynamicThreadPoolTriggerManager {

    /**
     * 刷新动态线程池参数
     *
     * @param request 请求体
     * @return 响应体
     */
    public static Boolean refresh(DynamicThreadPoolRefreshRequest request) {
        TriggerContext<DynamicThreadPoolRefreshRequest> triggerContext = new TriggerContext<>(TriggerTypeEnum.DYNAMIC_THREAD_POOL_REFRESH, request);
        return TriggerUtil.triggerWithLock(triggerContext);
    }
}
